<script setup lang="ts">
import { onMounted, ref } from 'vue';

import * as mars2d from 'mars2d';

const map = ref<mars2d.Map>();

onMounted(() => {
  map.value = new mars2d.Map('mars2dContainer', {
    zoom: 10,
    center: { lng: 116.39, lat: 39.9 },
    basemaps: [
      {
        name: '高德地图',
        type: 'gaode',
        layer: 'vec',
        show: true,
      },
    ],
  });
});
</script>

<template>
  <div id="mars2dContainer" class="mars2d-container"></div>
</template>

<style scoped></style>
